package wk.demo.broadcast;

import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.Intent;
import android.widget.Toast;

import wk.demo.tool.WkLogTool;


/**
 <receiver android:name="wk.demo.broadcast.ApptoBackReceiver"
 android:exported="false"  >
 &lt;!&ndash;不接受其他APP发出的广播&ndash;&gt;
 <intent-filter>
 <action android:name = "wkplayergotobackground123456"/>
 </intent-filter>
 </receiver>

 */
@Deprecated
public class ApptoBackReceiver extends BroadcastReceiver {
    public static final String ACTION_APP_BACKGROND ="wkplayergotobackground123456" ;

    @Override
    public void onReceive(Context context, Intent intent) {

        if (ACTION_APP_BACKGROND.equals(intent.getAction())){
            WkLogTool.showLog("showAlert-- onReceive="+intent.getAction());
            Toast.makeText( context, "进入后台" ,Toast.LENGTH_LONG).show();
        }

    }
}
